/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ComNo;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author 6766371
 */
public class Servidor implements Runnable {

    private int servPorta;

    Servidor(int servPorta) {
        this.servPorta = servPorta;
    }

    public int getServPorta() {
        return servPorta;
    }

    public void setServPorta(int servPorta) {
        this.servPorta = servPorta;
    }

    
    @Override
    public synchronized void run() {
        while (true) {
            try {
                NoComServidor servidor = new NoComServidor(this.getServPorta());
                servidor.OpComServidor();           //realiza a operacao do servidor, transferencia de arquivo
            } catch (IOException ex) {
                Logger.getLogger(Servidor.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
}
